package gov.fgn.sijyp.integracion.origen;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the relacionfiscaldespachoversion
 * database table.
 */
@Embeddable
public class RelacionFiscalDespachoVersionPK implements Serializable {
  // default serial version id, required for serializable classes.
  private static final long serialVersionUID = 1L;

  @Column(unique = true, nullable = false)
  private Integer idversion;

  @Column(unique = true, nullable = false, length = 10)
  private Integer fiscal;

  public RelacionFiscalDespachoVersionPK() {
  }

  public Integer getIdversion() {
    return this.idversion;
  }

  public void setIdversion(Integer idversion) {
    this.idversion = idversion;
  }

  public Integer getFiscal() {
    return this.fiscal;
  }

  public void setFiscal(Integer fiscal) {
    this.fiscal = fiscal;
  }

  public boolean equals(Object other) {
    if (this == other) {
      return true;
    }
    if (!(other instanceof RelacionFiscalDespachoVersionPK)) {
      return false;
    }
    RelacionFiscalDespachoVersionPK castOther = (RelacionFiscalDespachoVersionPK) other;
    return this.idversion.equals(castOther.idversion) && this.fiscal.equals(castOther.fiscal);
  }

  public int hashCode() {
    final int prime = 31;
    int hash = 17;
    hash = hash * prime + this.idversion.hashCode();
    hash = hash * prime + this.fiscal.hashCode();

    return hash;
  }
}